package com.easy.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
/*
字段名	类型	说明	约束
harvest_id	INT	记录ID（主键）	PRIMARY KEY, AUTO_INCREMENT
fruit_id	INT	水果ID	FOREIGN KEY REFERENCES fruit(fruit_id)
harvest_date	DATE	采摘日期	NOT NULL
batch_no	VARCHAR(20)	批次号	NOT NULL
quantity	DECIMAL(10,2)	采摘量(公斤)	NOT NULL
 */
@Data
public class Harvest {
    private Integer harvest_id;
    private Integer fruit_id;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime harvest_date;
    private String batch_no;
    private Double quantity;
    private Byte isdel;

    private String fruit_name;
}
